package com.dai.zhenfujin.visitingcard.activity.room;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.dai.zhenfujin.R;
import com.dai.zhenfujin.base.BaseActivity;
import com.dai.zhenfujin.visitingcard.adapter.VisitingCardAdapter;
import com.dai.zhenfujin.visitingcard.bean.VisitingCardBean;

import java.util.ArrayList;
import java.util.List;

public class NewHouseActivtiy extends BaseActivity {

    private TextView tvTitleName;
    private ImageView imageView;

    private ListView listView;

    private VisitingCardAdapter adapter;
    private List<VisitingCardBean> beanList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_new_house_activtiy);

        tvTitleName = findViewById(R.id.title_textview);
        imageView = findViewById(R.id.title_imageview);
        tvTitleName.setText("新房");

        listView = findViewById(R.id.newhouse_listview);


                imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });



        beanList = new ArrayList<>();

        for (int i = 0; i <20 ; i++) {
            beanList.add(new VisitingCardBean(
                    "张艺兴","总监","100米","张艺兴工作室集团",
                    "张艺兴工作室","120万起","住宅 | 洪山 | 洪山其他",
                    "光谷广场111号"));
        }
        adapter = new VisitingCardAdapter(this,beanList);
        listView.setAdapter(adapter);
        listView.setVerticalScrollBarEnabled(false);

    }
}
